<?php

class Users_Form_Users_Login extends Zend_Form
{
    /**
     * Form initialization
     *
     * @return self
     */
    public function init()
    {
        $this->setName('userLoginForm');

        $this->addElement($this->getFieldEmail());
        $this->addElement($this->getFieldPassword());
        $this->addElement($this->getFieldRemember());
        $this->addElement($this->getFieldSubmit());

        return $this;
    }

    public function getFieldEmail()
    {
        $field = new Zend_Form_Element_Text('email');
        $field->setLabel('User email');
        return $field;
    }

    public function getFieldPassword()
    {
        $field = new Zend_Form_Element_Password('password');
        $field->setLabel('Password');
        return $field;
    }

    public function getFieldSubmit()
    {
        $field = new Zend_Form_Element_Submit('submit');
        $field->setLabel('Login');
        return $field;
    }

    public function getFieldRemember()
    {
        $field = new Zend_Form_Element_Checkbox('rememberMe');
        $field->setLabel('Remember Me');
        return $field;
    }
}